<script setup lang="ts">
const props = defineProps({
    text: {
        type: String,
        default: "background",
    },
    img: {
        type: String,
        default: "none",
    },
})
</script>
<template>
    <text class="background" v-if="img === 'none'">{{ text }}</text>
    <image class="background" v-else :src="img" mode="scaleToFill"></image>
</template>
<style lang="scss">
background,
.background {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    position: absolute;
    top: 0;
    left: 0;
    width: inherit;
    height: inherit;
    z-index: -1;
    background-color: #567;
    color: #fff;
}
</style>
